package com.baizhi.thread;

/**
 * 继承Thread并重写run方法创建线程的 匿名内部类形式
 */
public class ThreadDemo3 {
    public static void main(String[] args) {
      Thread t1 = new Thread(){
          @Override
          public void run() {
              for (int i = 0; i < 1000; i++) {
                  System.out.println("hello,姐");
              }
          }
      };



      Thread t2 = new Thread(){
          @Override
          public void run() {
              for (int i = 0; i < 1000; i++) {
                  System.out.println("来了，老弟");
              }
          }
      };


      t1.start();
      t2.start();


    }
}




